  export default {
    Toast: {
      fail: (message) => {
        wx.hideToast({
          complete: () => {
            if (message.length > 7) {
              wx.showToast({
                mask: true,
                title: message,
                icon: 'none',
                duration: 1800

              })
            } else {
              wx.showToast({
                mask: true,
                title: message,
                icon: 'error',
                duration: 1800

              })
            }
          }
        })
      },
      succ: (message) => {
        wx.hideToast({
          complete: () => {
            if (message.length > 7) {
              wx.showToast({
                mask: true,
                title: message,
                icon: 'none',
                duration: 1800,
               
              })
            } else {
              wx.showToast({
                mask: true,
                title: message,
                icon: 'success',
                duration: 1800,
                
              })
            }
          }
        })
      },
      loading: (message) => {
        wx.hideLoading({
          complete: () => {
            wx.showLoading({
              title: message,
              mask: true
            })
          }
        })
      },
      clear: () => {
        wx.hideToast()
        wx.hideLoading()
      }
    },
    Dialog: {
      confirm: (message, fnConfirm) => {
        wx.showModal({
          title: '提示',
          content: message,
          success(res) {
            if (res.confirm && fnConfirm) {
              fnConfirm()
            }
          }
        })
      }
    },
    Notify: {
      warn: (message) => {
        wx.showModal({
          title: '提示',
          content: message,
          showCancel: false,
          confirmText: '知道了'
        })
      },
      error: (message) => {
        wx.showModal({
          title: '错误',
          content: message,
          showCancel: false,
          confirmText: '知道了'
        })
      }
    }
  }